package entities;

import java.io.Serializable;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Transient;

@Entity
@DiscriminatorValue(value="MOZO")
public class MozoEntity extends PersonalEntity implements Serializable{

	@Transient
	private static final long serialVersionUID = 1L;

	private float porComision;
	private float comisionAcum;

	
	public MozoEntity() {
		super();
	}

	public float getPorComision() {
		return porComision;
	}
	public void setPorComision(float porComision) {
		this.porComision = porComision;
	}
	public float getComisionAcum() {
		return comisionAcum;
	}
	public void setComisionAcum(float comisionAcum) {
		this.comisionAcum = comisionAcum;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + Float.floatToIntBits(comisionAcum);
		result = prime * result + Float.floatToIntBits(porComision);
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		MozoEntity other = (MozoEntity) obj;
		if (Float.floatToIntBits(comisionAcum) != Float
				.floatToIntBits(other.comisionAcum))
			return false;
		if (Float.floatToIntBits(porComision) != Float
				.floatToIntBits(other.porComision))
			return false;
		return true;
	}
	
	
}
